<?php

class CategoriaDao extends Dao {

    public function injectDependencies() {

    }

    public function findAll() {
        $this->initConnection();
        $StSql = TQuery::getSqlFindAllNoticesCategories();
        $tQuery = $this->tMysqli->exec($StSql);
        $ArCategorias = array();
        while($ArCategoriaData = mysqli_fetch_assoc($tQuery)) {
            $ArCategorias[] = new Categoria($ArCategoriaData['IDCategoria'], $ArCategoriaData['StCategoria']);
        }
        $this->closeConnection();
        return $ArCategorias;
    }

}

?>
